/**
 * @format
 */

import { AppRegistry, LogBox } from 'react-native';
import TrackPlayer from 'react-native-track-player';
import App from './App';
import { name as appName } from './app.json';

// 在应用启动最早期忽略第三方库的警告（必须在模块加载前）
LogBox.ignoreLogs([
  'new NativeEventEmitter',
  'EventEmitter.removeListener',
  'was called with a non-null argument without the required',
  'The app is running using the Legacy Architecture',
]);

// 注册 TrackPlayer Playback Service
TrackPlayer.registerPlaybackService(() =>
  require('./src/services/playbackService'),
);

AppRegistry.registerComponent(appName, () => App);
